package middol.base
/**
* @Description:    文档信息（数据字典）
* @Author:         zhangjiayu@middol.com
* @CreateDate:     2020/10/13 16:58
* @Version:        1.0
*/
class DocsController {
	static responseFormats = ['json', 'xml']
    DocsService docsService

    /**
     * 获取数据字典
     * @return
     */
    def getDataDic() {
        File file = docsService.getDataDic()
        response.setContentType("application/octet-stream")
        response.setHeader("Content-disposition", "attachment;filename=${new String(file.getName().getBytes(), 'iso-8859-1')}")
        response.outputStream << file.newInputStream()
    }
}
